package com.naiterui.ehp.bs.cms.modules.user.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;

import io.swagger.annotations.ApiModelProperty;

@Data
@TableName("standard_dict")
public class StandardDict implements java.io.Serializable {

    /**
     * 民族
     */
    public final static Integer TYPE_NATION = 1;

    @TableId
    @ApiModelProperty(value = "主键ID")
    private Long id;

    private Integer type;

    private String code;

    private String name;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date changedAt;

    /**
     * 乐观锁
     */
    @Version
    @JsonIgnore
    private Integer version;
}
